package com.eco.fanliapp.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.eco.fanliapp.entity.GoodsFreeIntegral;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 免单 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-12-25
 */
public interface GoodsFreeIntegralMapper extends BaseMapper<GoodsFreeIntegral> {

    /**
     * 根据goodsId查询积分商品
     *
     * @param goodsId
     * @return
     */
    GoodsFreeIntegral selectByGoodsId(@Param("goodsId") Long goodsId);

    List<GoodsFreeIntegral> selectGoodsList();

    int deleteByGoodsIds(@Param("goodsIds") String[] goodsIds);

    List<GoodsFreeIntegral> selectByUserId(Long userId);
}
